<template>
    <div class="control">
        <el-button size="small" icon="el-icon-circle-plus-outline" type="primary" @click="$emit('handleCreate')"> 新增
        </el-button>
        <el-button size="small" icon="el-icon-search" type="primary" @click="dialogTableVisible = true">高级查询</el-button>
        <el-dialog title="高级查询" :visible.sync="dialogTableVisible">
            <avue-form v-model="formData" :option="detailFormOption">
            </avue-form>
            <span slot="footer" class="dialog-footer">
                <el-button type="primary" @click="formSearch">确 定</el-button>
                <el-button @click="dialogTableVisible = false">取 消</el-button>
            </span>
        </el-dialog>

    </div>
</template>

<script>
export default {
    data() {
        return {
            open: 0,
            formData: {},
            dialogTableVisible: false,
        }
    },
    props: {
        formOption: {
            type: Object
        }
    },
    computed: {
        detailFormOption() {
            let op = this.formOption;
            return op;
        },
    },
    methods: {
        formSearch() {
            console.log(this.formData)
            this.$emit("getQuery", this.formData)
            this.dialogTableVisible = false
        }
    }
}
</script>

<style></style>